package cn.accp.mvc.controller;


import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


import cn.accp.mvc.entity.Types;
import cn.accp.mvc.service.TypesService;


@Controller
@RequestMapping("/page")
public class TypesController {
	@Autowired
	private TypesService typesService;
	public void setTypesService(TypesService typesService) {
		this.typesService = typesService;
	}
	@RequestMapping("/getAllTypes")
	public String getAllTypes(String opr,String id,HttpSession session){
		List<Types> typesList = new ArrayList<Types>();
		typesList = typesService.getAllTypes();
		session.setAttribute("typesList", typesList);
		session.setAttribute("opr", opr);
		session.setAttribute("id", id);
		return "/page/getAllDistrict.do";
	}
	
}
